package com.gupt.weekly.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author linzizun
 * @version 1.0
 * @date 2021/03/09 16:44
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "格式化返回")
public class CommonResult<T> {
    @ApiModelProperty(value = "状态码")
    private Integer code;
    @ApiModelProperty(value = "信息")
    private String message;
    @ApiModelProperty(value = "数据")
    private T data;

    public CommonResult(Integer code, String message) {
        this(code, message, null);
    }
}
